
/*function ouvrirFenetreSecteur()
{
	var largeur = 550;//550
	var hauteur = 350
	var top=(screen.height-350)/2;
	var left=(screen.width-largeur)/2;
	window.open('gestionAsynchrone.php?page=nouveauFlux','', 'top=' + top + ', left=' + left + ', resizable=no, location=no, width=' +largeur + ', height=' + hauteur + ', menubar=no, status=no, scrollbars=no, menubar=no');
}*/


function soumettre(form) {
	if(!validForm(form)) {
		return false;
	}
	
	var cinematic = form.mode.value;
	
	$.ajax({ 
    url: "index.php?page=AJAX_OPERATION&cinematic="+cinematic,
    data: { "noCompte": form.noCompte.value,
			"operationId": form.operationId.value,
			"noReleve": form.noReleve.value,
			"date": form.date.value,
			"libelle": form.libelle.value,
			"fluxId": form.fluxId.value,
			'modePaiementId': form.modePaiementId.value,
			'montant': form.montant.value,
			'verif': form.verif.checked?'checked':''
	}, 
    async: false, 
    success: function(retour) { 
      //alert('OK');
      return false;
    } 
	});
	
	
	
	if(cinematic=='create') {
	 	form.libelle.value='';
	 	form.fluxId.value='';
	 	form.modePaiementId.value='';
	 	form.montant.value='';
	 	form.libelle.focus();
	 	$("div#message").html("Op&eacute;ration cr&eacute;&eacute;e");
	} else {
		$("div#message").html("Op&eacute;ration &eacute;dit&eacute;e");
	}
	
	$("div#message").fadeIn("slow",function(){
		$("div#message").fadeOut("slow");
	});
	
  return false;
}



/*function getSoldeCompte(form){
	var params = "noCompte="+ form.noCompte.value
	$.getJSON(
	   "index.php?page=AJAX_SOLDECOMPTE&cinematic=display",
	    data=params, 
		function(json) { 
			alert('OK');
			document.getElementById('solde').value='';//json[0].value;
			//return false;
		}
	);
}*/

